//
//  OperationView.m
//  ProjectforHDX
//
//  Created by HDX on 16/8/3.
//  Copyright © 2016年 H.DX. All rights reserved.
//

#import "OperationView.h"

@implementation OperationView


-(id)initOperationFrame:(CGRect)frame icon:(UIImage*)icon title:(NSString*)title{
    self=[super initWithFrame:frame];
    if(self){
        
    
        RZCustomImageView *imageView=[[RZCustomImageView alloc] init];
        imageView.image=icon;
        [imageView setFrame:CGRectMake((self.width-icon.size.width)/2.f,15,icon.size.width,icon.size.height)];

        [self addSubview:imageView];
        
        UILabel *labTitle=[[UILabel alloc] init];
        labTitle.userInteractionEnabled = NO;
        [labTitle setFrame:CGRectMake(5,imageView.bottom+10, self.width-10, 40)];
        labTitle.numberOfLines = 0;
        labTitle.textColor=[UtilCheck hexStringToColor:@"ffffff" alpha:1];
        labTitle.textAlignment=NSTextAlignmentCenter;
        labTitle.text=[NSString stringWithFormat:@"%@",title];
        labTitle.font=CustomFont(11);
        
        [self addSubview:labTitle];
 
    }
    return self;
    
}
@end
